This invention relates to a memory access system, an address converter, and an address conversion method and, in particular, to address conversion upon accessing a memory divided into a plurality of banks.
In calculation by a computer, an operation speed not only depends upon an instruction execution speed of a CPU (Central Processing Unit) but also upon a memory access time required for the CPU to access a memory. Therefore, a reduction in memory access time greatly contributes to an increase in operation speed of the calculation by the computer.
In view of the above, proposal is made of a memory divided into a plurality of banks some of which can simultaneously be activated so as to increase an average access speed upon carrying out random access. Each bank includes a plurality of row addresses and at least one column address. As the memory of the type described, a SDRAM (Synchronous Dynamic Random Access Memory) and a Direct Rambus DRAM (Dynamic Random Access Memory) are known.
In the SDRAM, a plurality of banks can simultaneously be activated but the successive access to different row addresses in the same bank is inhibited. This is because, in order to successively access the different row addresses in the same bank, the memory must temporarily be inactivated. This results in occurrence of a delay in memory access.
In the Direct Rambus DRAM also, a plurality of banks can simultaneously be activated. However, limitation or inhibition is imposed not only upon the successive access to the different row addresses in the same bank but also upon the successive access to adjacent ones of the banks. This is because a sense amplifier is generally shared by the adjacent banks. Specifically, in order to successively access the different row addresses in the same bank or to successively access the adjacent banks, the memory must temporarily be inactivated. This results in occurrence of a delay in memory access.
In case where either one of the above-mentioned memories is used and completely random addresses are accessed, the necessity of temporarily inactivating the memory arises at a low probability as compared with a memory having a single bank structure. In other words, parallel access is allowed at a high probability so that the average access speed is increased. However, if those addresses to be accessed are concentrated to the same row address in the same bank or to any row addresses in the adjacent banks, such parallel access can not substantially be carried out. This inhibits the increase in average access speed.
In particular, consideration will be made about an application program for image processing. In the image processing, two-dimensional image data (or two-dimensional arrangement data) including a plurality of data elements represented by a plurality of XY coordinates are memorized in the memory by successively assigning the XY coordinates to the addresses in one-to-one correspondence. In the image processing, it is often that the access is successively made to a series of those data elements successive in a horizontal direction and thus contained in a horizontal region or that the access is successively made to a block of data elements contained in a rectangular region. Therefore, in case where such application program is executed, it is highly probable that the access is successively made to different row addresses in the same bank or to the adjacent banks. In this event, it is impossible to efficiently increase the average access speed in memory access.
It is therefore an object of this invention to provide a memory access system, an address converter, and an address conversion method which are capable of efficiently accessing a memory comprising a plurality of banks under the limitation or inhibition imposed upon successive access to different row addresses in the same bank and upon successive access to adjacent ones of the banks.
According to a first aspect of this invention, there is provided a memory access system comprising:
a memory divided into a plurality of banks, 2n in number (n being an integer greater than one), each of which is individually assigned with a bank number B (B being an integer satisfying 0xe2x89xa6Bxe2x89xa62nxe2x88x921) and includes a plurality of row addresses identified by row address numbers A (A being an integer satisfying Axe2x89xa70), said memory being inhibited from successively accessing different row addresses within the same bank of said banks, said memory being for use in memorizing two-dimensional arrangement data comprising a plurality of data elements each of which is represented by a coordinate (X, Y);
a memory access unit for accessing said memory to store said two-dimensional arrangement data into said memory, said memory access unit producing the coordinate (X, Y) corresponding to a particular data element of the data elements of said two-dimensional arrangement data when said memory access unit accesses said memory to store said particular data element into said memory; and
an address converter comprising a bank number calculating unit for calculating, in response to the coordinate (X, Y) corresponding to said particular data element, the bank number B of a particular bank of said banks where said particular data element is to be memorized, and a row address number calculating unit for calculating, in response to the coordinate (X, Y) corresponding to said particular data element, the row address number A of a particular address of the row addresses of said particular bank where said particular data element is to be memorized, the bank number B and the row address number A being given by:
B={Yxc3x97(2nxc3x97m+k)+X}mod 2n
A=INT[{Yxc3x97(2nxc3x97m+k)+X}/2n],
where m is a positive integer, where k is a positive integer smaller than 2n and other than 1, where mod is an operator for calculating a remainder, and where INT is an operator for obtaining an integral quotient;
the bank number B and the row address number A thus calculated being supplied to said memory.
According to a second aspect of this invention, there is provided a memory access system comprising:
a memory divided into a plurality of banks, 2n in number (n being an integer greater than two), each of which is individually assigned with a bank number B (B being an integer satisfying 0xe2x89xa6Bxe2x89xa62nxe2x88x921) and includes a plurality of row addresses identified by row address numbers A (A being an integer satisfying Axe2x89xa70), said memory being inhibited from successively accessing different row addresses within the same bank of said banks and from successively accessing adjacent ones of said banks which are adjacent to each other, said memory being for use in memorizing two-dimensional arrangement data comprising a plurality of data elements each of which is represented by a coordinate (X, Y);
a memory access unit for accessing said memory to store said two-dimensional arrangement data into said memory, said memory access unit producing the coordinate (X, Y) corresponding to a particular data element of the data elements of said two-dimensional arrangement data when said memory access unit accesses said memory to store said particular data element into said memory; and
an address converter comprising a bank number calculating unit for calculating, in response to the coordinate (X, Y) corresponding to said particular data element, the bank number B of a particular bank of said banks where said particular data element is to be memorized, and a row address number calculating unit for calculating, in response to the coordinate (X, Y) corresponding to said particular data element, the row address number A of a particular address of the row addresses of said particular bank where said particular data element is to be memorized, the bank number B and the row address number A being given by:
B=[{Yxc3x97(2nxc3x97m+k)+X) mod 2nxe2x88x921]xc3x972+INT([{Yxc3x97(2nxc3x97m+k)+X}mod 2n]/2nxe2x88x921)
A=INT [{Yxc3x97(2nxc3x97m+k)+X}/2n],
where m is a positive integer, where k is a positive integer smaller than 2n and other than 1, 2nxe2x88x921xe2x88x921, 2nxe2x88x921, 2nxe2x88x921+1, where mod is an operator for calculating a remainder, and where INT is an operator for obtaining an integral quotient;
the bank number B and the row address number A thus calculated being supplied to said memory.
According to a third aspect of this invention, there is provided an address converter for use in combination with a memory and a memory access unit, said memory being divided into a plurality of banks, 2n in number (n being an integer greater than one), each of which is individually assigned with a bank number B (B being an integer satisfying 0xe2x89xa6Bxe2x89xa62nxe2x88x921) and includes a plurality of row addresses identified by row address numbers A (A being an integer satisfying Axe2x89xa70), said memory being inhibited from successively accessing different row addresses within the same bank of said banks, said memory being for use in memorizing two-dimensional arrangement data comprising a plurality of data elements each of which is represented by a coordinate (X, Y), said memory access unit accessing said memory to store said two-dimensional arrangement data into said memory, said memory access unit producing the coordinate (X, Y) corresponding to a particular data element of the data elements of said two-dimensional arrangement data when said memory access unit accesses said memory to store said particular data element into said memory, said address converter comprising:
a bank number calculating unit for calculating, in response to the coordinate (X, Y) corresponding to said particular data element, the bank number B of a particular bank of said banks where said particular data element is to be memorized; and
a row address number calculating unit for calculating, in response to the coordinate (X, Y) corresponding to said particular data element, the address number A of a particular address of the addresses of said particular bank where said particular data element is to be memorized;
the bank number B and the row address number A being given by:
B={Yxc3x97(2nxc3x97m+k)+X}mod 2n
A=INT[{Yxc3x97(2nxc3x97m+k)+X}/2n],
where m is a positive integer, where k is a positive integer smaller than 2n and other than 1, where mod is an operator for calculating a remainder, and where INT is an operator for obtaining an integral quotient;
the bank number B and the row address number A thus calculated being supplied to said memory.
According to a fourth aspect of this invention, there is provided an address converter for use in combination with a memory and a memory access unit, said memory being divided into a plurality of banks, 2n in number (n being an integer greater than two), each of which is individually assigned with a bank number B (B being an integer satisfying 0xe2x89xa6Bxe2x89xa62nxe2x88x921) and includes a plurality of row addresses identified by row address numbers A (A being an integer satisfying Axe2x89xa70), said memory being inhibited from successively accessing different row addresses within the same bank of said banks and from successively accessing adjacent ones of said banks which are adjacent to each other, said memory being for use in memorizing two-dimensional arrangement data comprising a plurality of data elements each of which is represented by a coordinate (X, Y), said memory access unit accessing said memory to store said two-dimensional arrangement data into said memory, said memory access unit producing the coordinate (X, Y) corresponding to a particular data element of the data elements of said two-dimensional arrangement data when said memory access unit accesses said memory to store said particular data element into said memory, said address converter comprising:
a bank number calculating unit for calculating, in response to the coordinate (X, Y) corresponding to said particular data element, the bank number B of a particular bank of said banks where said particular data element is to be memorized; and
a row address number calculating unit for calculating, in response to the coordinate (X, Y) corresponding to said particular data element, the row address number A of a particular address of the row addresses of said particular bank where said particular data element is to be memorized;
the bank number B and the row address number A being given by:
B=[{Yxc3x97(2nxc3x97m+k)+X) mod 2nxe2x88x921]xc3x972+INT([{Yxc3x97(2nxc3x97m+k)+X}mod 2n]/2nxe2x88x921)
A=INT [{Yxc3x97(2nxc3x97m+k)+X}/2n],
where m is a positive integer, where k is a positive integer smaller than 2n and other than 1, 2nxe2x88x921xe2x88x921, 2nxe2x88x921, 2nxe2x88x921+1, where mod is an operator for calculating a remainder, and where INT is an operator for obtaining an integral quotient;
the bank number B and the row address number A thus calculated being supplied to said memory.
According to a fifth aspect of this invention, there is provided an address conversion method carried out in an address converter which is for use in combination with a memory and a memory access unit, said memory being divided into a plurality of banks, 2n in number (n being an integer greater than one), each of which is individually assigned with a bank number B (B being an integer satisfying 0xe2x89xa6B xe2x89xa62nxe2x88x921) and includes a plurality of row addresses identified by row address numbers A (A being an integer satisfying Axe2x89xa70), said memory being inhibited from successively accessing different row addresses within the same bank of said banks, said memory being for use in memorizing two-dimensional arrangement data comprising a plurality of data elements each of which is represented by a coordinate (X, Y), said memory access unit accessing said memory to store said two-dimensional arrangement data into said memory, said memory access unit producing the coordinate (X, Y) corresponding to a particular data element of the data elements of said two-dimensional arrangement data when said memory access unit accesses said memory to store said particular data element into said memory, said address conversion method comprising:
a bank number calculating step of calculating, in response to the coordinate (X, Y) corresponding to said particular data element, the bank number B of a particular bank of said banks where said particular data element is to be memorized, the bank number B being given by:
B={Yxc3x97(2nxc3x97m+k)+X}mod 2n,
where m is a positive integer, where k is a positive integer smaller than 2n and other than 1, and where mod is an operator for calculating a remainder, integral quotient; and
a row address number calculating step of calculating, in response to the coordinate (X, Y) corresponding to said particular data element, the address number A of a particular address of the row addresses of said particular bank where said particular data element is to be memorized, the row address number A being given by:
A=INT[{Yxc3x97(2nxc3x97m+k)+X}/2n],
where INT is an operator for obtaining an integral quotient;
the bank number B and the row address number A thus calculated being supplied to said memory.
According to a sixth aspect of this invention, there is provided an address conversion method carried out in an address converter which is for use in combination with a memory and a memory access unit, said memory being divided into a plurality of banks, 2n in number (n being an integer greater than two), each of which is individually assigned with a bank number B (B being an integer satisfying 0xe2x89xa6Bxe2x89xa62nxe2x88x921) and includes a plurality of row addresses identified by row address numbers A (A being an integer satisfying Axe2x89xa70), said memory being inhibited from successively accessing different row addresses within the same bank of said banks and from successively accessing adjacent ones of said banks which are adjacent to each other, said memory being for use in memorizing two-dimensional arrangement data comprising a plurality of data elements each of which is represented by a coordinate (X, Y), said memory access unit accessing said memory to store said two-dimensional arrangement data into said memory, said memory access unit producing the coordinate (X, Y) corresponding to a particular data element of the data elements of said two-dimensional arrangement data when said memory access unit accesses said memory to store said particular data element into said memory, said address conversion method comprising:
a bank number calculating step of calculating, in response to the coordinate (X, Y) corresponding to said particular data element, the bank number B of a particular bank of said banks where said particular data element is to be memorized, the bank number B being given by:
xe2x80x83B=[{Yxc3x97(2nxc3x97m+k)+X) mod 2nxe2x88x921]xc3x972+INT([{Yxc3x97(2nxc3x97m+k)+X}mod 2n]/2nxe2x88x921),
where m is a positive integer, where k is a positive integer smaller than 2n and other than 1, 2nxe2x88x921xe2x88x921, 2nxe2x88x921, 2nxe2x88x921 +1, where mod is an operator for calculating a remainder, and where INT is an operator for obtaining an integral quotient; and
a row address number calculating step of calculating, in response to the coordinate (X, Y) corresponding to said particular data element, the row address number A of a particular address of the row addresses of said particular bank where said particular data element is to be memorized, the row address number A being given by:
A=INT[{Yxc3x97(2nxc3x97m+k)+X}/2n];
the bank number B and the row address number A thus calculated being supplied to said memory.